package Day08_20;

public class Test_Title {
    public static void main(String[] args) {
        MyThread01 t1 = new MyThread01();
        t1.setName("t1");
        System.out.println("Main begin!");
        t1.start();

        try {
            t1.sleep(1000 );//t1.sleep()  ==> Thread.sleep()==main.sleep()
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        System.out.println("Main Out!");

    }
}

class MyThread01 extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() +"--->"+i);
        }
    }
}
